<template>
  <h1>1.组件基本写法</h1>
  <h2>count:{{count}}---a:{{a}}</h2>
  <button @click="changeCount">修改count的值</button>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
export default defineComponent({
    name:"About",
    setup() {
      let count = 0
      const changeCount = () => {
        console.log('触发了');
        count++
      }
      return{
        count,
        changeCount,
        a:1
      }
    }
})
</script>
<style scoped>
</style>